package com.dxf.bigdata.D04_spark

import java.io.{InputStream, ObjectInputStream}
import java.net.{ServerSocket, Socket}

object T01_Executor {
  def main(args: Array[String]): Unit = {
    val server = new ServerSocket(9999)
    val socket: Socket = server.accept()
    val in: InputStream = socket.getInputStream
    val objIn: ObjectInputStream = new ObjectInputStream(in)
    while (true) {
      val task: T01_SubTask = objIn.readObject().asInstanceOf[T01_SubTask]
      val list: List[Int] = task.computer()
      println("数据[9999] ", list)

    }
    objIn.close()
    in.close()

    server.close()

  }
}
